<jsp:include page="logincheck.jsp" />
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page import="java.util.*" %>

<jsp:useBean id="message" class="se2.Message" scope="request"/>
<jsp:setProperty name="message" property="*"/>


<%
	//phoneAccount = new se2.PhoneAccount(Integer.valueOf(request.getParameter("id")));
	//phoneAccount.setId(Integer.valueOf(request.getParameter("id")));
	//phoneAccount.getPhoneAccountFromDatabase();
	message.getMessageFromDB(Integer.valueOf(request.getParameter("id")));
	message.setMessageStatus(true);
%>

<html>

	<head>
		<title>Administration Console</title>
		<link rel="stylesheet" href="default.css" type="text/css" media="screen"></link>
		<script type="text/javascript" language="javascript" src="addPhoneAccount.js"></script>
	</head>

	<body>
		<div id="container">
			<div id="navigation">
<p>&nbsp;</p>
<jsp:include page="navigation.jsp" />
			</div>
			
			<div id="header">				
				<img src="images/header.png" />
			</div>

			<div id="content">
<!-- Main code -->

<h1>Administrator Mailbox :: View Message</h1>

<form name="viewMessage" id="viewMessage" method="post" action="viewMessageFunction.jsp?id=<%= message.getId() %>">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr style="background-image: url('images/tableBackground.png');>
			<td width="100">&nbsp;</td>
			<td width="150"><strong>Subject</strong></td>
			<td width="*"><%= message.getSubject() %></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td colspan="2"><%= message.getBody() %></td>
		</tr>
		
		<tr>
			<td colspan="3" align="right">
				<input type="button" value="Return" onclick="javascript:document.location.href='viewMailbox.jsp'" />
				<input type="submit" value="Mark Unread" />
			</td>
		</tr>
	</table>
</form>

<!-- Main Code -->
			</div>

			<div id="footer">
<jsp:include page="footer.jsp" />
			</div>
		</div>
	</body>

</html>